let test s =
 let lexbuf = Lexing.from_string(s) in
   Parser.main Lexer.mini_ml lexbuf
 ;;


let test_values = [

 "a+b"; "1+2"; "5";

 "1+2-3"; "3+u*t";
"(3+u)*t" ; "(a+b)*c+7-d/4" ; "a+b*c+7-d/4";
" fn x => x+5"; "fn x => 5*x+y";
(*
" match x with | true -> a | b -> b end";
" match x with | true -> 1 | false -> 0 end";
" match y with | 0 -> 1 | s -> s end";
" let x = 0 in (x+y)";
" let rec fact x = 0 in  match x with | 0 -> 1 | n -> fact ( n* (n-1)) end "
 
*)
];;

let rec test_suite l =
match l with
| [] ->  (match l with | [] -> "" | s::r -> "")
| h :: t -> (Ast.print_exp  (test h) 0) ^ "\n"  ^  test_suite t;;

print_string(test_suite  test_values);;
